;;;; Actors
;;;
;;; Experiments with Agents that interact with the dreaming tree world.

(in-package :dt)

(defclass world-state ()
  ((actors :accessor world-actors :initarg :actors)
   (props :acessor world-props :initarg :props)
   (features :accessor world-features :initarg :features))
  (:documentation "What the computer knows of the world.")

;;;;

(defclass actor ()
  ((senses :accessor agent-senses :initarg :senses)
   (state :accessor agent-state :initarg :state)
   (goals :accessor agent-state :initarg :goals))
  (:documentation "An agent that has the ability(ies) to sense the world around it, which
is represented internally to some degree, and has various goals it is trying to achieve." )

(defmethod update ((agent actor) world)
  (dolist (sense (senses agent))
    (let ((sense-data (funcall sense world)))
      (update-state agent sense-data)))
  (update-goals agent))

;;;;

(defclass actor-2d (actor)